package com.example.room.dao

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
import com.example.room.table.UserDaoEntity
import com.example.room.table.VideoDaoEntity

@Dao
interface VideoInfoDao {
    @Insert
    suspend fun insert(vararg userInfo: VideoDaoEntity)

    @Delete
    suspend fun delete(vararg userInfo: VideoDaoEntity)

    @Update
    suspend fun update(vararg userInfo: VideoDaoEntity)

    @Query("select * from video_table order by id")
    suspend fun queryAll():List<UserDaoEntity>

    @Query("select * from video_table where id = :videoName")
    suspend fun queryById(videoName: Int): List<VideoDaoEntity>
}